/**      
 * @file		vectors.cpp
 * @description	Demonstrates how to use vectors. This is a simple
 *				example of how you can use vectors to store a 
 *				collection of data.
 * @course		CSCI 123 Section 00000
 * @assignment 
 * @date		mm/dd/yyyy
 * @author		Brad Rippe (00000000) brippe@fullcoll.edu
 * @version		1.0
 */
#include <iostream>
#include <vector>
using namespace std;

/**
 * @return zero if the application executes successfully
 */
int main() {
	// the < > bracket notation defines what type of variables
	// are going to be stored in the vector
	vector <double> doubleVector;

	cout << "Adding ints to the doubleVector\n";
	for(int i = 1; i < 200; i++) {
		// to add elements to a vector, you use the
		// push_back() member function
		doubleVector.push_back(i*i);
	}

	// You know this by now
	cout.setf(ios::fixed);
	cout.setf(ios::showpoint);
	cout.precision(2);

	// Notice you can use the [] bracket notation to 
	// to retrieve elements from the vector which looks
	// similar to an array
	for(int i = 0; i < doubleVector.size(); i++) {
		cout << "doubleVector[" << i << "] = " 
			 << doubleVector[i] << endl;
	}
	return 0;
}

